<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ page session="true" %>
<spring:url value="/" var="baseUrl" />
<!DOCTYPE html> 
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>GSIT: QC System</title>
    <meta name="description" content="gsit">
    <meta name="author" content="vivek">

    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->


  
    <!-- Styles --> 
    <link type="text/css" href="${baseUrl}resources/css/custom-theme/jquery-ui-1.8.16.custom.css" rel="stylesheet" />
    <link href="${baseUrl}resources/bootstrap/bootstrap.css" rel="stylesheet">
    <link href="${baseUrl}resources/css/demo.css" rel="stylesheet">
    <link href="${baseUrl}resources/css/style.css" rel="stylesheet">
    <link href="${baseUrl}resources/css/jquery.iviewer.css" rel="stylesheet">
  
		<style>
            .viewer
            {
                width: 80%;
                height: 350px;
                border: 1px solid black;
                position: relative;
            }
            
            .wrapper
            {
                overflow: hidden;
            }
        </style>
  </head>

  <body>

  <!--[if IE]>
  <link rel="stylesheet" type="text/css" href="css/custom-theme/jquery.ui.1.8.16.ie.css"/>
  <![endif]-->

    <div class="topbar">
      <div class="fill">
        <div class="container">
          <a class="brand" href="http://godspeedglobalservices.com">Welcome to QC System </a>
          <ul class="nav">
            <li class="active"><a href="${baseUrl}home">Home</a></li>
            <li><a href="${baseUrl}issues">Feedback/Issues</a></li>
            <li><a href="${baseUrl}contact">Contact</a></li>
          </ul>
          <div class="pull-right" style="color: white; padding-top: 10px;">
            Hello :<c:out value="${login.username}"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="${baseUrl}logout">Logout</a> 
            
          </div>
          
        </div>
      </div>
    </div>


    <div class="container">

      <div class="content">
       
        <div class="row">

          <!--left col-->
          <div style="padding-left: 20px;" align="center">


          <!--welcome-->
		    <div id="viewer" align="center" class="viewer"></div>
		    <br/>
            <div class="alert-message block-message warning">      
           		<form:form action="${baseUrl}changeStatus/" commandName="record" method="post" >
                    <form:label path="name"></form:label>
                    <label for="status">QC Action:</label>
                  	<form:select id="combobox" path="recordState" class="ui-widget-content ui-corner-all" >
						<option value="ACCEPT">Accept</option>
						<option value="REJECT">Reject</option>
					</form:select>
					<form:hidden  id="id" path="id" value="${id}"/>
					<form:hidden  id="name" path="name" value="${name}"/>
					<form:hidden  id="path" path="path" value="${path}"/>
					<form:hidden  id="count" path="count" value="${count}"/>
					
					<form:select  id="recordRejectAll" multiple="true" path="recordRejectAll" disabled="true">
						<form:options items="${allRecordRejects}" itemValue="rejectStateAsString" itemLabel="message" /> 
					</form:select>
					
					
					
					
		            <input type="submit" class="button" value="Submit"/>
                </form:form>
          	</div>
          <!--end welcome-->
			

          </div>
          <!--end col-->
          

        </div>
      </div>

        <footer>
        <p>&copy; Godspeed IT services.   </p>
      </footer>

    </div> <!-- /container -->


     



       

        <script type="text/javascript" src="${baseUrl}resources/js/jquery-1.6.2.min.js"></script>
        <script type="text/javascript" src="${baseUrl}resources/js/jquery-ui-1.8.16.custom.min.js"></script>
        <script src="${baseUrl}resources/third-party/wijmo/jquery.mousewheel.min.js" type="text/javascript"></script>
        <script type="text/javascript" src="${baseUrl}resources/js/jquery.iviewer.js"></script>
        
         <!--scripts-->
        <script type="text/javascript">
		
		   $(document).ready(function(){
			   
			   
			   var locationVar = "${webConfig.webResourcesLocation}"+"${record.path}";
			   
			   var iv1 = $("#viewer").iviewer({
	               src: locationVar,
	               zoom:'fit'
	          });
			  
			   

	        /*    $("#in").click(function(){ iv1.iviewer('zoom_by', 1); }); 
	           $("#out").click(function(){ iv1.iviewer('zoom_by', -1); }); 
	           $("#fit").click(function(){ iv1.iviewer('fit'); }); 
	           $("#orig").click(function(){ iv1.iviewer('set_zoom', 100); });  */
	           
	           
	           
			   $("#combobox").change(function () {
				   
			          $("select option:selected").each(function () {

			        	  if($(this).text()=='Reject'){
			        		  $("#recordRejectAll").attr("disabled",false);
			        	  }else{
			        		  $("#recordRejectAll").attr("disabled",true);
			        	  }
			               
			          });
			         
			     });
		   
		   }); 
		  
		   
			


         
		
		</script>

        <!--daterangepicker-->
        <script type="text/javascript" src="${baseUrl}resources/third-party/jQuery-UI-Date-Range-Picker/js/date.js"></script>
        <script type="text/javascript" src="${baseUrl}resources/third-party/jQuery-UI-Date-Range-Picker/js/daterangepicker.jQuery.js"></script>

        <!--wijmo-->
        <script src="${baseUrl}resources/third-party/wijmo/jquery.mousewheel.min.js" type="text/javascript"></script>
        <script src="${baseUrl}resources/third-party/wijmo/jquery.bgiframe-2.1.3-pre.js" type="text/javascript"></script>
        <script src="${baseUrl}resources/third-party/wijmo/jquery.wijmo-open.1.5.0.min.js" type="text/javascript"></script>


        <!-- FileInput -->
        <script src="${baseUrl}resources/third-party/jQuery-UI-FileInput/js/enhance.min.js" type="text/javascript"></script>
        <script src="${baseUrl}resources/third-party/jQuery-UI-FileInput/js/fileinput.jquery.js" type="text/javascript"></script>


        <!--init for this page-->
        <script type="text/javascript" src="${baseUrl}resources/js/demo.js"></script>

		
  </body>
</html>
